<!DOCTYPE html>
<html lang="zh-cn">
<head>
        <meta charset="utf-8">
        <title>政府公文流转系统</title>
        <!-- zui -->
        <link href="__CSS__/zui.min.css" rel="stylesheet">
        <style type="text/css">
        .max{
            width:100%;
            height:100%;
            position:absolute;
            background-color: #336699;
        }
        .min{
            width:500px;
            height:300px;
            /*background-color: pink;*/
            position:absolute;
            top:50%;
            left:50%;
            margin-left: -250px;
            margin-top: -150px;
            background: url("__STATIC__/Imgs/1.jpg") no-repeat;
            background-size: 600px;
        }
        .p1{
            font-size: 30px;
            text-align: center;
        }
        </style>
</head>
<body>
    <div class="max">
        <div class="min">
            <div>
                <p class="p1">政府公文流转系统</p>
            </div>
            <form class="form-horizontal" method="post" action ="{:url('index/index/login')}" onsubmit=" return checkFrom()">
              <div class="form-group">
                <label for="exampleInputAccount9" class="col-sm-2 required" >用户名</label>
                <div class="col-md-6 col-sm-10">
                  <input type="text" class="form-control name" id="exampleInputAccount9" name='name'  placeholder="用户名">
                </div>
              </div>
              <div class="form-group">
                <label for="exampleInputPassword4" class="col-sm-2 required" >密码</label>
                <div class="col-md-6 col-sm-10">
                  <input type="password" class="form-control pass" id="exampleInputPassword4" name="pass" placeholder="密码">
                </div>
              </div>
              <div class="form-group">
                <div class="col-sm-offset-2 col-md-6">
                  <button type="submit" class="btn btn-default col-md-12 ">登录</button>
                </div>
              </div>
            </form>

        </div>
    </div>
    <!-- jQuery (ZUI中的Javascript组件依赖于jQuery) -->
    <script src="__JS__/jquery-2.1.4.min.js"></script>
    <!-- ZUI Javascript组件 -->
    <script src="__JS__/zui.min.js"></script>
    <script type="text/javascript">
        function checkFrom(){
            // alert('1');

            // return false;
            return checkPhone()&&checkPass();
        }
        function checkPhone(){
            //input框内容不为空
          var phone = $('.name').val();
          if(phone){
            return true;
          }else{
                alert('用户名不能为空');
            return false;
          }

        }
        function checkPass(){
            //input框内容不为空
            var pass = $('.pass').val();
            if(pass){
                return true;
            }else{
                alert('密码不能为空');
                return false;
            }

        }
    </script>

</body>
</html>